/**
 * 公用参数
 */
var opneid='';//
/**
 * 默认加载
 * @type {{init: Window.process.init, public: Window.process.public}}
 */
window.process = {
    init() {
        this.initData();
        this.public();
       
    },
    // initData(){
    //     //  this.load()
    // },
    initData:function () {
        var paramsData = getUrlParamsCode();
        opneid= paramsData['openid'];
        if(!opneid){
            opneid=''
        }
        var logintype = paramsData['logintype'];
        localStorage.openid=opneid;
        if(logintype=='wx'){
            this.load()
        }

    },
    load(){
       var api='/api/wx/login'
        var data= {
            username: "",
            password: "",
            openid: opneid
        }
        postAjax(api,data,this.callbackLoad,this)
    },
    callbackLoad(data,that){
      //  localStorage.openid=data.openid;
        localStorage.setIteRm("cardInfo", JSON.stringify(data));
    },
    swiper() {
        var leagth=$(".swiper-container img").length;
        if(leagth<2){
        }else {
            $(".swiper-container").swiper({
                loop: true,
                autoplayDisableOnInteraction: false,
                autoplay: 3000
            });
        }

    },
    public() {
        this.swiper();

    }
};

/**
 * 启动方法执行
 */
process.init();



